/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.perlak;

import com.perlak.configuration.ConfigurationManager;
import com.perlak.configuration.FileWalkerSettings;
import com.perlak.filesearch.FileScanner;
import com.perlak.filesearch.FileSearchRequest;
import com.perlak.filesearch.FileSearchResult;
import com.perlak.filters.IFilteredItem;
import com.perlak.filters.duplication.DuplicationFilter;
import com.perlak.resultviewer.ConsoleViewer;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author mateusz
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String test1 = ConfigurationManager.getInstance().getSettings().get(FileWalkerSettings.TEST1);

        System.out.println("Test data from settings:"+test1);

        FileSearchRequest req = new FileSearchRequest("*.xml", "~/", "local");
        List<FileSearchRequest> lstReq = new ArrayList<FileSearchRequest>();
        lstReq.add(req);
        FileScanner sc = new FileScanner(lstReq);
        List<FileSearchResult> lstResults = sc.getResults();

        DuplicationFilter dups = new DuplicationFilter();
        List<IFilteredItem> lstDups = dups.filter(lstResults);

        ConsoleViewer console = new ConsoleViewer(lstResults);
        console.output();
    }
}
